package com.java_senior_8;

import java.util.ArrayList;

public class StudentManager1 {
    public static void main(String[] args) {
        Student stu1=new Student(1,"李刚炎","男",24);
        Student stu2=new Student(2,"李刚炎","男",24);
        Student stu3=new Student(3,"李刚炎","男",24);
        Student stu4=new Student(4,"李刚炎","男",24);

        ArrayList list=new ArrayList();
        list.add(stu1);
        list.add(stu2);
        list.add(stu3);
        list.add(stu4);
        for (int i = 0; i <list.size() ; i++) {
            Student student=(Student)list.get(i);
            System.out.println(student.getId()+student.getName()+student.getSex()+student.getAge());
        }
        list.remove(0);
       System.out.println( list.contains(stu2));
        for (int i = 0; i <list.size() ; i++) {
            Student student=(Student)list.get(i);
            System.out.println(student.getId()+student.getName()+student.getSex()+student.getAge());
        }



    }
}
